import {
    getDayData,
    getMoonData,
    getYearData
} from "./request";

export default async (field, params) => {
    let data = null;

    switch (field) {
        case "day":
            data = await getDayData(params);
            break;
        case "month":
            data = await getMoonData(params);
            break;
        case "year":
            data = await getYearData(params);
            break;
        default:
            break;
    }

    return data;
}